package com.senlingspace.system.domain;

import com.senlingspace.common.core.domain.BaseEntity;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 订单分账快照
 *
 * @author lebronjames
 * @date 2024/08/01
 */
public class SlkjOrderSplitSnapshot extends BaseEntity {

    // 关联类型 INVESTOR=投资方、PROJECT=项目、TICKET_SYSTEM=票务、OPERATION=运营
    public static final String INVESTOR = "INVESTOR";
    public static final String PROJECT = "PROJECT";
    public static final String TICKET_SYSTEM = "TICKET_SYSTEM";
    public static final String OPERATION = "OPERATION";

    private Long id; // 主键
    private Long orderId; // 订单主键
    private Long relatedId; // 关联 ID
    private String relatedType; // 关联类型 INVESTOR=投资方、PROJECT=项目、TICKET_SYSTEM=票务、OPERATION=运营
    private BigDecimal preRecRatio; // 回本前比例
    private BigDecimal postRecRatio; // 回本后比例
    private BigDecimal splitRatio; // 分账比例
    private String otherFields; // 其他信息 JSON
    private Long profitShareAmount;// TODO：股东分账金额（注意：这个字段值=元*10000，使用的时候/10000=元）
    private BigDecimal currentUseRatio; // 当前使用比例


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getRelatedId() {
        return relatedId;
    }

    public void setRelatedId(Long relatedId) {
        this.relatedId = relatedId;
    }

    public String getRelatedType() {
        return relatedType;
    }

    public void setRelatedType(String relatedType) {
        this.relatedType = relatedType;
    }

    public BigDecimal getPreRecRatio() {
        return preRecRatio;
    }

    public void setPreRecRatio(BigDecimal preRecRatio) {
        this.preRecRatio = preRecRatio;
    }

    public BigDecimal getPostRecRatio() {
        return postRecRatio;
    }

    public void setPostRecRatio(BigDecimal postRecRatio) {
        this.postRecRatio = postRecRatio;
    }

    public BigDecimal getSplitRatio() {
        return splitRatio;
    }

    public void setSplitRatio(BigDecimal splitRatio) {
        this.splitRatio = splitRatio;
    }

    public String getOtherFields() {
        return otherFields;
    }

    public void setOtherFields(String otherFields) {
        this.otherFields = otherFields;
    }

    public Long getProfitShareAmount() {
        return profitShareAmount;
    }

    public void setProfitShareAmount(Long profitShareAmount) {
        this.profitShareAmount = profitShareAmount;
    }

    public BigDecimal getCurrentUseRatio() {
        return currentUseRatio;
    }

    public void setCurrentUseRatio(BigDecimal currentUseRatio) {
        this.currentUseRatio = currentUseRatio;
    }

    @Override
    public String toString() {
        return "SlkjOrderSplitSnapshot{" +
                "id=" + id +
                ", orderId=" + orderId +
                ", relatedId=" + relatedId +
                ", relatedType='" + relatedType + '\'' +
                ", preRecRatio=" + preRecRatio +
                ", postRecRatio=" + postRecRatio +
                ", splitRatio=" + splitRatio +
                ", otherFields='" + otherFields + '\'' +
                ", profitShareAmount=" + profitShareAmount +
                ", currentUseRatio=" + currentUseRatio +
                '}';
    }
}
